<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>15-数组映射方法map</title>
</head>
<body>
    <script>
        var arr = [1,3,5,7,9,10,20,30];

        var newArr1 = arr.map(function(val){
            return val*2;
        });
        var newArr = arr.map((val)=>{
            return val*2;
        });
        console.log(newArr);


    </script>
</body>
</html>